<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags" %>
<script type="text/javascript">
<!--
	var isLogin = '<s:property value="%{#session.SESSION_USER != null}"/>';
	var ut = '<s:property value="%{#session.SESSION_USER.type}"/>';
//-->
</script>
<s:if test="%{#session.SESSION_USER == null}">
	<div class="top_div">
	<div class="logo"><a href="<%=request.getContextPath()%>"></a></div>
	<div class="topbar">
		<div class="topbar_l"></div>
		<div class="topbar_r"></div>
		<a href="<%=request.getContextPath()%>/passport/login">登陆</a> 
		<a href="<%=request.getContextPath()%>/signup/user">注册</a> 
		<a href="<%=request.getContextPath()%>/passport/new_project">发布</a> 
		<a href="#">订阅</a></div>
	</div>
</s:if>
<s:else>
<div class="top_div">
	<div class="logo"> <a href="<%=request.getContextPath() %>"></a> </div>
	<div class="topbar">
		<div class="topbar_l"></div>
		<div class="topbar_r"></div>
		<span>
			<script type="text/javascript">
				var date = new Date();
				var hour = date.getHours() + 1;
				
				if (hour < 12) {
					document.write('上午好,');	
				} else if (hour >= 12 && hour < 18) {
					document.write('下午好,');
				} else {
					document.write('晚上好,');
				}
			</script>
			<a href="<%=request.getContextPath() %>/passport/index" onclick="$.cookie('select_nav', 'passport_class', { expires: 7, path: '/'});"><s:property value="%{#session.SESSION_USER.nikeName}"/></a>
		</span>
		<!--a href="<%=request.getContextPath() %>/passport/index">个人中心</a-->
		<s:if test="%{#session.SESSION_USER.type == @com.transer.constant.Constants@USER_TYPE_PUBLISHER}">
			<a href="<%=request.getContextPath() %>/passport/new_project">发布</a> 
		</s:if>
		
		<a href="<%=request.getContextPath() %>/passport/logout_execute">退出</a>
	</div>
</div>
</s:else>